package com.example.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.model.Customer;
import com.example.demo.model.Manager;
import com.example.demo.service.impl.CustomerServiceimpl;
import org.apache.ibatis.annotations.Param;

import java.security.NoSuchAlgorithmException;
import java.util.List;

public interface CustomerService extends IService<Customer> {
    Customer doLogin(String name);
    List<Customer> findAddress(Integer id);
    Customer getCustomer(Integer uid);
    void changePassword(Integer uid,String oldPassword, String newPassword) throws CustomerServiceimpl.UserNotFoundException, CustomerServiceimpl.PasswordNotMatchException, CustomerServiceimpl.UpdateException, NoSuchAlgorithmException;
    Page<Customer> pageQueryCustomer(Page page, @Param("name") String name, @Param("sno") String sno);
    public Customer getOneCustomer(int id);
    public List<Customer> mylist();
    //根据用户的id查询用户的数据
   Customer getByUid(Integer uid) throws CustomerServiceimpl.UserNotFoundException;

    //更新用户的数据操作
    void changeInfo(Integer uid, Customer customer) throws CustomerServiceimpl.UserNotFoundException, CustomerServiceimpl.UpdateException;

}
